<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
	
    <h:body>	
    #{delegationBean.fillMatchListThisWeek}
    	<ui:composition template="/user/template.xhtml">
    		<div class="novinka prvni">
                <h1>Delegace tento týden</h1> 
                <c:forEach  var="competion" items="#{delegationBean.competionListThis}"  >
                 	<h2>#{competion.name}</h2>
                 	<table>
		                  <tr>
		                      <th>&nbsp;Domácí</th>
		                      <th>Hlavní rozhodčí</th>
		                      <th>AR1</th>
		                      <th>DS</th>
		                  </tr>
		                  <tr>
		                      <th>&nbsp;Hosté</th>
		                      <th></th>
		                      <th>AR2</th>
		                      <th>Spolujízda</th>
		                  </tr>
	                 	 <c:forEach var="player" items="#{delegationBean.matchList}"  >
			                 <c:if test="#{competion.name eq player.competion.name}">   
			                    <tr class="suda">
			                      <td style="font-size: 11px"><b>&nbsp;<h:outputText value="#{player.datum} " escape="false"/> <h:outputText value="#{player.start}" escape="false"/></b></td>
			                      <td></td>
			                      <td></td>
			                      <td></td>
			                    </tr>
			                    <tr>
			                      <td class="jmeno2">&nbsp;#{player.homeTeam.name}</td>
			                      <td><h:outputText value="#{player.mainReferee}" escape="false"/></td>
			                      <td><h:outputText value="#{player.lineReferee}" escape="false"/></td>
			                      <td><h:outputText value="#{player.delegat}" escape="false"/></td>
			                    </tr>
			                    <tr>
			                      <td>&nbsp;#{player.awayTeam.name}</td>
			                      <td></td>
			                      <td><h:outputText value="#{player.lineRefereeTwo}" escape="false"/></td>
			                      <td><h:outputText value="#{player.spolujizda}" escape="false"/></td>
			                    </tr> 
			                 </c:if>                    	 	                 	 
	                 	 </c:forEach>
                 	 </table>
                </c:forEach>
             </div> 
    	</ui:composition>
	</h:body>
</html>